//
//  ContactTableViewCell.m
//  Wechat
//
//  Created by FONERY on 2019/9/9.
//  Copyright © 2019 Zhangfan. All rights reserved.
//

#import "ContactTableViewCell.h"
#import "RRContacts.h"

@interface ContactTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *iconImv;
@property (weak, nonatomic) IBOutlet UILabel *nameLab;

@end

@implementation ContactTableViewCell

+ (instancetype)cellWithTableView:(UITableView *)tableView {
    ContactTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ContactTableViewCellIdentifier"];
    if (cell == nil) {
        cell = [[[UINib nibWithNibName:@"ContactTableViewCell" bundle:nil] instantiateWithOwner:nil options:nil] firstObject];
    }
    return cell;
}

+ (CGFloat)cellHeight {
    return 44;
}

- (void)setContact:(RRContacts *)contact {
    _contact = contact;
    
    self.nameLab.text = contact.name;
    self.iconImv.image = contact.image;
}

@end
